package com.huawei.classroom.student.h17;

public class Player {
	private String name;
	public Player(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	@Override
	public boolean equals(Object o) {//判断是否为同一玩家
		if(this == o) return true;
		if(!(o instanceof Player)) return false;
		final Player other = (Player)o;
		
		if(this.name.equals(other.getName()))
			return true;
		else
			return false;
	}
}
